﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>微街秀 > 个人中心</title>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width,height=device-height,inital-scale=1.0,maximum-scale=1.0,user-scalable=no;" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <meta name="format-detection" content="telephone=no" />
    <link href="plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
    <link href="plugins/bootstrap-fileinput-master/css/fileinput.min.css" rel="stylesheet" type="text/css" />
    <link href="plugins/bootstrap-fileinput-master/css/fileinput.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" type="text/css" href="css/css.css?25" />
    <link href="css/Personal.css" rel="stylesheet" type="text/css" />

    <style type="text/css">
        .erweim {
            bottom: 23.5%;
            left: 6px;
        }

        .ergzh {
            bottom: 15.5%;
            left: 14px;
        }
    </style>
</head>
<body>
    <form id="myform">
        <div class="wam">
            <div class="persondetail  ">
                <div class="My">
                    我的
                </div>
                <img src="img/Seting.jpg" class="setimg" onclick="if(login())window.location.href='Set.html'" />
                <div class="Myimg">
                    <div class="Myings">
                        
                        <img src="img/39.png" id="Headpont" />
                        <div class="UserDetail">
                            <p id="userid">
                            </p>
                            <p id="username" style="display:none">
                            </p>
                            <p style="word-break: keep-all;white-space: nowrap;">
                                <span id="version" style="padding-right:5px;"></span> |
                                <span style="padding-left:5px;" onclick="if(login())window.location.href='collection.html'">我的收藏</span>
                            </p>
                            <p style="word-break: keep-all;white-space: nowrap;"><span id="end_date" style="padding-right:5px;"></span> </p>
                        </div>
                    </div>
                </div>
            </div>
            <div class="personnum" style="display:none">
                <div class="staticleft" onclick="if(login())window.location.href='collection.html'">
                    <div class="statictxt">
                        我的收藏
                    </div>
                    <img src="img/45.png" class="staticimg" />
                </div>
                <div class="staticright" onclick=" if(login())window.location.href='Statistical.html?summny=wap'">
                    <div class="statictxt">
                        数据统计
                    </div>
                    <img src="img/45.png" class="staticimg" />
                </div>
            </div>
            <div class="informatiom" style="margin-top:10px" onclick="toUrl(this); return false;">
                <div class="infomleft">
                    名称
                </div>
                <div id="name" class="infomRight">
                </div>
                <img src="img/45.png" class="infomImg" />
            </div>
            <div class="informatiom" id="phoneBody">
                <div class="infomleft">
                    手机
                </div>
                <div id="phone" class="infomRight">
                </div>
                <img src="img/45.png" class="infomImg" />
            </div>
            <div class="informatiom" onclick="toUrl(this); return false;">
                <div class="infomleft">
                    推广电话
                </div>
                <div id="tel" class="infomRight">
                </div>
                <img src="img/45.png" class="infomImg" />
            </div>
            <div class="informatiom" onclick="toUrl(this); return false;">
                <div class="infomleft">
                    QQ
                </div>
                <div id="QQ" class="infomRight">
                </div>
                <img src="img/45.png" class="infomImg" />
            </div>
            <div class="informatiom" style="margin-top:10px" onclick="toUrl(this); return false;">
                <div class="infomleft">
                    邮箱
                </div>
                <div id="Email" class="infomRight">
                </div>
                <img src="img/45.png" class="infomImg" />
            </div>
            <div id="wx_code" class="informatiom" onclick="window.location.href = 'update-ewm.html'">
                <div class="infomleft">
                    微信二维码
                </div>
                <div class="infomRight">
                </div>
                <img src="img/45.png" class="infomImg" />
            </div>
            <div id="wx_public_code" class="informatiom" onclick="window.location.href = 'update-dyh.html'">
                <div class="infomleft">
                    公众号二维码
                </div>
                <div class="infomRight">
                </div>
                <img src="img/45.png" class="infomImg" />
            </div>
        </div>
        <div class="bottom">
            <ul>
                <li>
                    <div onclick="window.location.href='index.html?25'">
                        <img src="img/tab1_g.png" /><br />
                        发现
                    </div>
                </li>
                <li>
                    <div onclick="window.location.href='publish.html?25'">
                        <img src="img/tab2_g.png" /><br />
                        发布
                    </div>
                </li>
                <li>
                    <div onclick="window.location.href = 'Makesh_1.html?25'">
                        <img src="img/tab3_g.png" /><br />
                        推广
                    </div>
                </li>
                <li>
                    <div class="Defutalcolor">
                        <img src="img/tab4_y.png" /><br />
                        我的
                    </div>
                </li>
            </ul>
        </div>

        <div class="backimg-panl buzhou hide" onclick="NextBZ(1)">
            <div class="font-content erweim">
                <div class=" text-center"=text-center">
                    <p>
                        点击此处
                    </p>
                    <p>
                        设置微信二维码
                    </p>
                </div>
                <img src="img/buzhou/5_1.png" style=" width:=width 61%;"=61%;" />
            </div>

        </div>

        <div class="backimg-panl buzhou hide" onclick="SetBZ(5)">
            <div class="font-content ergzh">
                <div class=" text-center"=text-center">
                    <p>
                        点击此处
                    </p>
                    <p>
                        设置公众号二维码
                    </p>
                </div>
                <img src="img/buzhou/5_2.png" style=" width:=width 61%;"=61%;" />
            </div>

        </div>


        <script src="js/jquery-2.1.4.min.js" type="text/javascript"></script>
        <script src="js/jquery-form.js" type="text/javascript"></script>
        <script src="plugins/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
        <script src="js/dialog.js" type="text/javascript"></script>
        <script src="js/gl-dialog.js" type="text/javascript"></script>
        <script src="js/ajax-data.js" type="text/javascript"></script>
        <script src="js/base.js" type="text/javascript"></script>
        <script src="js/jquery-submit-1.1.js" type="text/javascript"></script>
        
        <script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
        <script src="js/sha.js" type="text/javascript"></script>
        <script src="js/sign.js" type="text/javascript"></script>
        <script src="js/Personal.js?25" type="text/javascript"></script>
    <script type="text/javascript">
        var access_token = "";
        $(function () {
                
            //修改手机号
            $("#phoneBody").on("click", function () {
                window.location.href = "reset-phone.html";

            });
            var param = {};
            AjaxStart("ajax/WxJsApiAccessToken.ashx?get",
                param,
                function (data) {
                    if (data.code == 0) {
                        var s = sign(data.item.JsApi_Ticket, location.href.split('#')[0]);
                        access_token = data.item.Access_Token;
                        wx.config({
                            debug: false,
                            // 开启调试模式,调用的所有api的返回值会在客户端alert出来，若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
                            appId: data.item.AppId, // 必填，公众号的唯一标识
                            timestamp: s.timestamp, // 必填，生成签名的时间戳
                            nonceStr: s.nonceStr, // 必填，生成签名的随机串
                            signature: s.signature, // 必填，签名，见附录1
                            jsApiList: ['getLocation', 'chooseImage', 'uploadImage'] //获取地理位置接口
                        });
                    } else
                        Alert(data.msg);
                });

                
        });
           
        function renderReverse(data) {
            console.log(data);
            var addr = data.result.addressComponent;
            if (addr) {
                area1 = addr.province;
                area2 = addr.city;
                area3 = addr.district;
            }
            var param = "area1=" + area1 + "&area2=" + area2 + "&area3=" + area3;
            if (area1 == "" && area3 == "" && area3 == "") {
                return;
            }
            AjaxStart("ajax/fc_setting.ashx?Setting", param, function (data) {
                console.log(data);
            });
        }
            
        //重新显示图片
        function resetImage(src) {
            $(".Myings img").attr("src", src);
            Upheadpont();
        }


        //微信登录时，更换登录方式
        function ChangeLogin(isupdate) {
            if (getCookie("logintype") == "1") {
                var old = getCookie("changelogin");
                if (old == null) old = "";
                if (old.indexOf(userid + ",") > -1 || old.indexOf("," + userid) > -1)
                    return;

                if (getQueryString("change") != null && getQueryString("change") == "1")
                    return;

                if (isupdate != null && isupdate != 1)
                    window.location.href = 'change_login.html?phone=' + $("#phone").html();
            }
        }
        wx.ready(function () {
            AjaxStart("ajax/fc_setting.ashx?get",{}, function (data) {
                if (data.code == 0&&data.item.area1==="") {
                    wx.getLocation({
                        type: 'wgs84', // 默认为wgs84的gps坐标，如果要返回直接给openLocation用的火星坐标，可传入'gcj02'
                        success: function (res) {
                            var latitude = res.latitude; // 纬度，浮点数，范围为90 ~ -90
                            var longitude = res.longitude; // 经度，浮点数，范围为180 ~ -180。
                            var speed = res.speed; // 速度，以米/每秒计
                            var accuracy = res.accuracy; // 位置精度
                            var location = latitude + "," + longitude;
                            console.log(res);
                            var url =
                                "http://api.map.baidu.com/geocoder/v2/?callback=renderReverse&location=" + location + "&output=json&pois=1&ak=RwwOB2yIpgl9ZpCg8uoqu2B7Vf5ELnVz";
                            $.getScript(url);

                        }
                    });
                }
            });
            //浏览器端
            //选择了图片提交图片
            $("#Headpont").click(function () {

                wx.chooseImage({
                    count: 1, // 默认9
                    sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图，默认二者都有
                    sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机，默认二者都有
                    success: function (res) {
                        console.log(res);
                        var imgId = res.localIds[0]; // 返回选定照片的本地ID列表，localId可以作为img标签的src属性显示图片
                        wx.uploadImage({
                            localId: imgId, // 需要上传的图片的本地ID，由chooseImage接口获得
                            isShowProgressTips: 1, // 默认为1，显示进度提示
                            success: function (res) {
                                var serverId = res.serverId; // 返回图片的服务器端ID
                                var url =
                                    "http://file.api.weixin.qq.com/cgi-bin/media/get?access_token=" + access_token + "&media_id=" + serverId;

                                var upapi = "/Client2/Ajax/Upload.ashx?WxImg&is_cut=1&width=100&height=100&url=" + encodeURIComponent(url);
                                console.log(upapi);
                                //上传图片
                                $("#myform").ajaxSubmit({
                                    type: 'post',
                                    dataType: "json",
                                    url: upapi,
                                    success: function (data) {
                                        console.log(data);
                                        wait.dismiss();
                                        $(".Myings img").attr("src", data.item);
                                        Upheadpont();
                                    },
                                    error: function (XmlHttpRequest, textStatus, errorThrown) {
                                        wait.dismiss();
                                        $("#file_user_logo").val("");
                                    }
                                });

                            }
                        });
                    }
                });

            });
        });
        wx.error(function (res) {
            Alert(res.errMsg);
        });
        ShowBZ(5);
    </script>
    </form>
</body>
</html>
